Like Expressions

Like expressions can be used to determine if a given string matches a given regular expression. Each like expression has the following form:

{<string-expression> | <function-invocation>} like

{<string-expression> | <function-invocation>}

If an operand is a function invocation, it must be string-valued.

The right operand must evaluate to a regular expression, as described in http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html, with the addition that the following characters (supported by SQL like) are allowed:

  • % : matches an arbitrary sequence of characters (equivalent to .* in Java’s regular expression dialect)

  • _ : matches a single arbitrary character (equivalent to . in Java’s regular expression dialect)

A like expression evaluates to true if the value of the left operand matches the regular expression pattern designated by the right operand. It evaluates to false otherwise.

Example

isCore(op) = (op.name like '%Coring')